<!DOCTYPE html>
<html>
    <#include "../head.html">
    <style>
        .account_type{float:left;margin-top: 3px;}
    </style>
    <body class="full">
        <div class="mc">
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="资金使用记录">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">

                                <div class="toolbor-module export">
                                    <input type="button" onclick="exportxls()" value="导出当前报表" class="input-button export-btn"/>
                                </div>

                                <#if param?exists>
                                    <#if param.get("dotime1")?exists><#assign dotime1=param.get("dotime1")></#if>
                                    <#if param.get("dotime2")?exists><#assign dotime2=param.get("dotime2")></#if>
                                    <#if param.get("username")?exists><#assign username=param.get("username")></#if>
                                    <#if param.get("account_type")?exists><#assign account_type=param.get("account_type")></#if>
                                </#if>

                                <div class="toolbor-module search">
                                    <div class="formTit">用户名：</div>
                                    <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                    <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                </div>

                                <div class="toolbor-module search">
                                    <div class="formTit">类型：</div>
                                    <#if account_type?exists>
                                        <@linkage name="account_type" id="account_type" class="account_type" nid="account_type" type="value" default=param.account_type noselect="全部"/>
                                        <#else>
                                            <@linkage name="account_type" id="account_type" class="account_type" nid="account_type" type="value" noselect="全部"/>
                                    </#if>

                                </div>

                                <div class="toolbor-module search">
                                    <div class="formTit">时间：</div>
                                    <input class="_search-value" name="dotime1" id="dotime1" value="${dotime1!}" size="15" onclick="change_picktime()"/>
                                    <div class="formTit"> 到 </div>
                                    <input class="_search-value" name="dotime2" id="dotime2"  value="${dotime2!}"  size="15" onclick="change_picktime()"/>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名称</td>
                                            <td>类型</td>
                                            <td>总金额</td>
                                            <td>操作金额</td>
                                            <td>可用金额</td>
                                            <td>冻结金额</td>
                                            <td>待收金额</td>
                                            <td>待还金额</td>
                                            <td>交易对方</td>
                                            <td>记录时间</td>
                                            <td>备注</td>
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item.id?c}</td>
                                                <td><#if item.user??&&item.user.showName??><a onclick='alertPop("用户详细信息查看","url:post?${request.getContextPath()}/admin/attestation/viewUserInfo.html?userId=${item.user.userId?c}",500,230,"true","","true","text");' href="javascript:void(0)">${item.user.showName!}</a><#else>-</#if></td>
                                                <td>${Type(item.type,'account_type')!"错误类型!"}</td>
                                                <td>${item.total!}</td>
                                                <td>${item.money!}</td>
                                                <td>${item.useMoney!}</td>
                                                <td>${item.noUseMoney!}</td>
                                                <td>${item.collection}</td>
                                                <td>${item.repay}</td>
                                                <td><#if item.toUser??>${item.toUser.showName!}<#else>-</#if></td>
                                                <td>${item.addtime!}</td>
                                                <td>${item.remark!}</td>
                                            </tr>
                                        </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1"  />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script>
                                    var url = '?search=true';
                                    var xlsurl = '?type=export';

                                    function sousuo(){
                                        var sou = "";
                                        var username = $("#username").val();
                                        var dotime1 = $("#dotime1").val();
                                        var dotime2 = $("#dotime2").val();

                                        if (username!=""&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                        var account_type = $("#account_type").val();
                                        if (account_type!=null){
                                            sou += "&account_type="+account_type;
                                        }
                                        if (dotime1!=null){
                                            sou += "&dotime1="+dotime1;
                                        }
                                        if (dotime2!=null){
                                            sou += "&dotime2="+dotime2;
                                        }

                                        location.href=url+sou;

                                    }
                                    function exportxls(){
                                        var num='${(page.total)?c}';
                                        num=num.replace(",","");
                                        if(num>30000){ //条数自己定义，但必须小于65536
                                            alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。
                                            return false;
                                        }
                                        var sou = "";
                                        var username = $("#username").val();


                                        if (username!=""&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                        var account_type = $("#account_type").val();

                                        if (account_type!=null){
                                            sou += "&account_type="+account_type;
                                        }
                                        if (sou!=""){
                                            location.href=xlsurl+sou;
                                        }else{
                                            location.href=xlsurl;
                                        }
                                    }
                                </script>
                            </div>
            </div>
        </div>
        <div class="mc-b"><#include "../foot.html"></div>
        <#include "../jsPage.html">
    </body>
</html>

